﻿using MengLin.OOP.DesignPattern.FlyWeightPattern.DoWebSite.Abstract;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace MengLin.OOP.DesignPattern.FlyWeightPattern.DoWebSite.Implements
{
    /// <summary>
    /// 具体的网站
    /// </summary>
    public class ConcreteWebSite: AbstractWebSite
    {
        private string _name = "";
        public ConcreteWebSite(string name)
        {
            _name = name;
        }

        public override void Use()
        {
            Console.WriteLine("网站分类：" + _name);
        }

        public override void Use(User user)
        {
            Console.WriteLine("网站分类：" + _name + " 用户：" + user.Name);
        }
    }
}
